- issuable = local_assigns.fetch(:issuable)
- presenter = local_assigns.fetch(:presenter)

- can_update_approvers = can?(current_user, :update_approvers, issuable)
- approver_presenter = MergeRequestApproverPresenter.new(issuable, skip_user: current_user)
- show_code_owner_tip = approver_presenter.show_code_owner_tips?
- should_skip_author = !issuable.merge_requests_author_approval?

- if presenter.approval_feature_available?
  #js-mr-approvals-input{ data: { 'project_id': @target_project.id,
    'author_id': should_skip_author ? issuable.author.id : nil,
    'can_edit': can?(current_user, :update_approvers, issuable).to_s,
    'can_update_approvers': can_update_approvers.to_s,
    'show_code_owner_tip': show_code_owner_tip.to_s,
    'allow_multi_rule': @target_project.multiple_approval_rules_available?.to_s,
    'can-override': @target_project.can_override_approvers?.to_s,
    'mr_id': issuable.iid,
    'mr_settings_path': presenter.api_approval_settings_path,
    'eligible_approvers_docs_path': help_page_path('user/project/merge_requests/approvals/rules', anchor: 'eligible-approvers'),
    'project_settings_path': presenter.api_project_approval_settings_path } }
    .gl-mt-5
      = gl_loading_icon(size: 'md', inline: true)
  = render 'projects/merge_requests/code_owner_approval_rules', merge_request: @mr_presenter
- elsif ::Gitlab::CurrentSettings.should_check_namespace_plan?
  - top_level_namespace = @target_project.root_ancestor
  - if can?(current_user, :admin_group, top_level_namespace)
    #js-mr-approvals-promo{ data: { try_now_path: new_trial_path(namespace_id: top_level_namespace.id),
      learn_more_path: help_page_path('user/project/merge_requests/approvals/index'),
      promo_image_path: image_path('illustrations/empty-state/empty-merge-requests-md.svg'),
      promo_image_alt: s_('ApprovalRule|A merge request author collaborating with a merge request approver') } }
